Optimal. Leaf size=378 \[ -\frac {2 \left (2 A b^2+a b B-a^2 (3 A+C)\right ) \sqrt {\frac {b+a \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 a}{a+b}\right ) \sqrt {\sec (c+d x)}}{3 a^2 \left (a^2-b^2\right ) d \sqrt {a+b \sec (c+d x)}}-\frac {2 \left (2 A b^3+3 a^3 B+a b^2 B-2 a^2 b (3 A+2 C)\right ) E\left (\frac {1}{2} (c+d x)|\frac {2 a}{a+b}\right ) \sqrt {a+b \sec (c+d x)}}{3 a^2 \left (a^2-b^2\right )^2 d \sqrt {\frac {b+a \cos (c+d x)}{a+b}} \sqrt {\sec (c+d x)}}-\frac {2 \left (A b^2-a (b B-a C)\right ) \sqrt {\sec (c+d x)} \sin (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \sec (c+d x))^{3/2}}+\frac {2 \left (A b^4+2 a^3 b B+2 a b^3 B+a^4 C-5 a^2 b^2 (A+C)\right ) \sqrt {\sec (c+d x)} \sin (c+d x)}{3 a b \left (a^2-b^2\right )^2 d \sqrt {a+b \sec (c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.72, antiderivative size = 378, normalized size of antiderivative = 1.00, number of steps
used = 9, number of rules used = 9, integrand size = 45, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {4183, 4185,
4120, 3941, 2734, 2732, 3943, 2742, 2740} \begin {gather*} -\frac {2 \sin (c+d x) \sqrt {\sec (c+d x)} \left (A b^2-a (b B-a C)\right )}{3 b d \left (a^2-b^2\right ) (a+b \sec (c+d x))^{3/2}}-\frac {2 \sqrt {\sec (c+d x)} \left (-\left (a^2 (3 A+C)\right )+a b B+2 A b^2\right ) \sqrt {\frac {a \cos (c+d x)+b}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 a}{a+b}\right )}{3 a^2 d \left (a^2-b^2\right ) \sqrt {a+b \sec (c+d x)}}-\frac {2 \left (3 a^3 B-2 a^2 b (3 A+2 C)+a b^2 B+2 A b^3\right ) \sqrt {a+b \sec (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 a}{a+b}\right )}{3 a^2 d \left (a^2-b^2\right )^2 \sqrt {\sec (c+d x)} \sqrt {\frac {a \cos (c+d x)+b}{a+b}}}+\frac {2 \sin (c+d x) \sqrt {\sec (c+d x)} \left (a^4 C+2 a^3 b B-5 a^2 b^2 (A+C)+2 a b^3 B+A b^4\right )}{3 a b d \left (a^2-b^2\right )^2 \sqrt {a+b \sec (c+d x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2732
Rule 2734
Rule 2740
Rule 2742
Rule 3941
Rule 3943
Rule 4120
Rule 4183
Rule 4185
Rubi steps
\begin {align*} \int \frac {\sqrt {\sec (c+d x)} \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+b \sec (c+d x))^{5/2}} \, dx &=-\frac {2 \left (A b^2-a (b B-a C)\right ) \sqrt {\sec (c+d x)} \sin (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \sec (c+d x))^{3/2}}-\frac {2 \int \frac {\frac {1}{2} \left (-A b^2+a (b B-a C)\right )+\frac {3}{2} b (b B-a (A+C)) \sec (c+d x)+\frac {1}{2} \left (2 A b^2-2 a b B-a^2 C+3 b^2 C\right ) \sec ^2(c+d x)}{\sqrt {\sec (c+d x)} (a+b \sec (c+d x))^{3/2}} \, dx}{3 b \left (a^2-b^2\right )}\\ &=-\frac {2 \left (A b^2-a (b B-a C)\right ) \sqrt {\sec (c+d x)} \sin (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \sec (c+d x))^{3/2}}+\frac {2 \left (A b^4+2 a^3 b B+2 a b^3 B+a^4 C-5 a^2 b^2 (A+C)\right ) \sqrt {\sec (c+d x)} \sin (c+d x)}{3 a b \left (a^2-b^2\right )^2 d \sqrt {a+b \sec (c+d x)}}+\frac {4 \int \frac {-\frac {1}{4} b \left (2 A b^3+3 a^3 B+a b^2 B-2 a^2 b (3 A+2 C)\right )-\frac {1}{4} a b \left (4 a b B-a^2 (3 A+C)-b^2 (A+3 C)\right ) \sec (c+d x)}{\sqrt {\sec (c+d x)} \sqrt {a+b \sec (c+d x)}} \, dx}{3 a b \left (a^2-b^2\right )^2}\\ &=-\frac {2 \left (A b^2-a (b B-a C)\right ) \sqrt {\sec (c+d x)} \sin (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \sec (c+d x))^{3/2}}+\frac {2 \left (A b^4+2 a^3 b B+2 a b^3 B+a^4 C-5 a^2 b^2 (A+C)\right ) \sqrt {\sec (c+d x)} \sin (c+d x)}{3 a b \left (a^2-b^2\right )^2 d \sqrt {a+b \sec (c+d x)}}-\frac {\left (2 A b^2+a b B-a^2 (3 A+C)\right ) \int \frac {\sqrt {\sec (c+d x)}}{\sqrt {a+b \sec (c+d x)}} \, dx}{3 a^2 \left (a^2-b^2\right )}-\frac {\left (2 A b^3+3 a^3 B+a b^2 B-2 a^2 b (3 A+2 C)\right ) \int \frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {\sec (c+d x)}} \, dx}{3 a^2 \left (a^2-b^2\right )^2}\\ &=-\frac {2 \left (A b^2-a (b B-a C)\right ) \sqrt {\sec (c+d x)} \sin (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \sec (c+d x))^{3/2}}+\frac {2 \left (A b^4+2 a^3 b B+2 a b^3 B+a^4 C-5 a^2 b^2 (A+C)\right ) \sqrt {\sec (c+d x)} \sin (c+d x)}{3 a b \left (a^2-b^2\right )^2 d \sqrt {a+b \sec (c+d x)}}-\frac {\left (\left (2 A b^2+a b B-a^2 (3 A+C)\right ) \sqrt {b+a \cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {1}{\sqrt {b+a \cos (c+d x)}} \, dx}{3 a^2 \left (a^2-b^2\right ) \sqrt {a+b \sec (c+d x)}}-\frac {\left (\left (2 A b^3+3 a^3 B+a b^2 B-2 a^2 b (3 A+2 C)\right ) \sqrt {a+b \sec (c+d x)}\right ) \int \sqrt {b+a \cos (c+d x)} \, dx}{3 a^2 \left (a^2-b^2\right )^2 \sqrt {b+a \cos (c+d x)} \sqrt {\sec (c+d x)}}\\ &=-\frac {2 \left (A b^2-a (b B-a C)\right ) \sqrt {\sec (c+d x)} \sin (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \sec (c+d x))^{3/2}}+\frac {2 \left (A b^4+2 a^3 b B+2 a b^3 B+a^4 C-5 a^2 b^2 (A+C)\right ) \sqrt {\sec (c+d x)} \sin (c+d x)}{3 a b \left (a^2-b^2\right )^2 d \sqrt {a+b \sec (c+d x)}}-\frac {\left (\left (2 A b^2+a b B-a^2 (3 A+C)\right ) \sqrt {\frac {b+a \cos (c+d x)}{a+b}} \sqrt {\sec (c+d x)}\right ) \int \frac {1}{\sqrt {\frac {b}{a+b}+\frac {a \cos (c+d x)}{a+b}}} \, dx}{3 a^2 \left (a^2-b^2\right ) \sqrt {a+b \sec (c+d x)}}-\frac {\left (\left (2 A b^3+3 a^3 B+a b^2 B-2 a^2 b (3 A+2 C)\right ) \sqrt {a+b \sec (c+d x)}\right ) \int \sqrt {\frac {b}{a+b}+\frac {a \cos (c+d x)}{a+b}} \, dx}{3 a^2 \left (a^2-b^2\right )^2 \sqrt {\frac {b+a \cos (c+d x)}{a+b}} \sqrt {\sec (c+d x)}}\\ &=-\frac {2 \left (2 A b^2+a b B-a^2 (3 A+C)\right ) \sqrt {\frac {b+a \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 a}{a+b}\right ) \sqrt {\sec (c+d x)}}{3 a^2 \left (a^2-b^2\right ) d \sqrt {a+b \sec (c+d x)}}-\frac {2 \left (2 A b^3+3 a^3 B+a b^2 B-2 a^2 b (3 A+2 C)\right ) E\left (\frac {1}{2} (c+d x)|\frac {2 a}{a+b}\right ) \sqrt {a+b \sec (c+d x)}}{3 a^2 \left (a^2-b^2\right )^2 d \sqrt {\frac {b+a \cos (c+d x)}{a+b}} \sqrt {\sec (c+d x)}}-\frac {2 \left (A b^2-a (b B-a C)\right ) \sqrt {\sec (c+d x)} \sin (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \sec (c+d x))^{3/2}}+\frac {2 \left (A b^4+2 a^3 b B+2 a b^3 B+a^4 C-5 a^2 b^2 (A+C)\right ) \sqrt {\sec (c+d x)} \sin (c+d x)}{3 a b \left (a^2-b^2\right )^2 d \sqrt {a+b \sec (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 6 vs. order 4 in
optimal.
time = 7.85, size = 5040, normalized size = 13.33 \begin {gather*} \text {Result too large to show} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(5162\) vs.
\(2(408)=816\).
time = 0.26, size = 5163, normalized size = 13.66
method | result | size |
default | \(\text {Expression too large to display}\) | \(5163\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.74, size = 1180, normalized size = 3.12 \begin {gather*} \frac {\sqrt {2} {\left (-3 i \, {\left (3 \, A + C\right )} a^{4} b^{2} + 6 i \, B a^{3} b^{3} + i \, {\left (9 \, A - C\right )} a^{2} b^{4} - 2 i \, B a b^{5} - 4 i \, A b^{6} + {\left (-3 i \, {\left (3 \, A + C\right )} a^{6} + 6 i \, B a^{5} b + i \, {\left (9 \, A - C\right )} a^{4} b^{2} - 2 i \, B a^{3} b^{3} - 4 i \, A a^{2} b^{4}\right )} \cos \left (d x + c\right )^{2} - 2 \, {\left (3 i \, {\left (3 \, A + C\right )} a^{5} b - 6 i \, B a^{4} b^{2} - i \, {\left (9 \, A - C\right )} a^{3} b^{3} + 2 i \, B a^{2} b^{4} + 4 i \, A a b^{5}\right )} \cos \left (d x + c\right )\right )} \sqrt {a} {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (3 \, a^{2} - 4 \, b^{2}\right )}}{3 \, a^{2}}, \frac {8 \, {\left (9 \, a^{2} b - 8 \, b^{3}\right )}}{27 \, a^{3}}, \frac {3 \, a \cos \left (d x + c\right ) + 3 i \, a \sin \left (d x + c\right ) + 2 \, b}{3 \, a}\right ) + \sqrt {2} {\left (3 i \, {\left (3 \, A + C\right )} a^{4} b^{2} - 6 i \, B a^{3} b^{3} - i \, {\left (9 \, A - C\right )} a^{2} b^{4} + 2 i \, B a b^{5} + 4 i \, A b^{6} + {\left (3 i \, {\left (3 \, A + C\right )} a^{6} - 6 i \, B a^{5} b - i \, {\left (9 \, A - C\right )} a^{4} b^{2} + 2 i \, B a^{3} b^{3} + 4 i \, A a^{2} b^{4}\right )} \cos \left (d x + c\right )^{2} - 2 \, {\left (-3 i \, {\left (3 \, A + C\right )} a^{5} b + 6 i \, B a^{4} b^{2} + i \, {\left (9 \, A - C\right )} a^{3} b^{3} - 2 i \, B a^{2} b^{4} - 4 i \, A a b^{5}\right )} \cos \left (d x + c\right )\right )} \sqrt {a} {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (3 \, a^{2} - 4 \, b^{2}\right )}}{3 \, a^{2}}, \frac {8 \, {\left (9 \, a^{2} b - 8 \, b^{3}\right )}}{27 \, a^{3}}, \frac {3 \, a \cos \left (d x + c\right ) - 3 i \, a \sin \left (d x + c\right ) + 2 \, b}{3 \, a}\right ) - 3 \, \sqrt {2} {\left (3 i \, B a^{4} b^{2} - 2 i \, {\left (3 \, A + 2 \, C\right )} a^{3} b^{3} + i \, B a^{2} b^{4} + 2 i \, A a b^{5} + {\left (3 i \, B a^{6} - 2 i \, {\left (3 \, A + 2 \, C\right )} a^{5} b + i \, B a^{4} b^{2} + 2 i \, A a^{3} b^{3}\right )} \cos \left (d x + c\right )^{2} + 2 \, {\left (3 i \, B a^{5} b - 2 i \, {\left (3 \, A + 2 \, C\right )} a^{4} b^{2} + i \, B a^{3} b^{3} + 2 i \, A a^{2} b^{4}\right )} \cos \left (d x + c\right )\right )} \sqrt {a} {\rm weierstrassZeta}\left (-\frac {4 \, {\left (3 \, a^{2} - 4 \, b^{2}\right )}}{3 \, a^{2}}, \frac {8 \, {\left (9 \, a^{2} b - 8 \, b^{3}\right )}}{27 \, a^{3}}, {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (3 \, a^{2} - 4 \, b^{2}\right )}}{3 \, a^{2}}, \frac {8 \, {\left (9 \, a^{2} b - 8 \, b^{3}\right )}}{27 \, a^{3}}, \frac {3 \, a \cos \left (d x + c\right ) + 3 i \, a \sin \left (d x + c\right ) + 2 \, b}{3 \, a}\right )\right ) - 3 \, \sqrt {2} {\left (-3 i \, B a^{4} b^{2} + 2 i \, {\left (3 \, A + 2 \, C\right )} a^{3} b^{3} - i \, B a^{2} b^{4} - 2 i \, A a b^{5} + {\left (-3 i \, B a^{6} + 2 i \, {\left (3 \, A + 2 \, C\right )} a^{5} b - i \, B a^{4} b^{2} - 2 i \, A a^{3} b^{3}\right )} \cos \left (d x + c\right )^{2} + 2 \, {\left (-3 i \, B a^{5} b + 2 i \, {\left (3 \, A + 2 \, C\right )} a^{4} b^{2} - i \, B a^{3} b^{3} - 2 i \, A a^{2} b^{4}\right )} \cos \left (d x + c\right )\right )} \sqrt {a} {\rm weierstrassZeta}\left (-\frac {4 \, {\left (3 \, a^{2} - 4 \, b^{2}\right )}}{3 \, a^{2}}, \frac {8 \, {\left (9 \, a^{2} b - 8 \, b^{3}\right )}}{27 \, a^{3}}, {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (3 \, a^{2} - 4 \, b^{2}\right )}}{3 \, a^{2}}, \frac {8 \, {\left (9 \, a^{2} b - 8 \, b^{3}\right )}}{27 \, a^{3}}, \frac {3 \, a \cos \left (d x + c\right ) - 3 i \, a \sin \left (d x + c\right ) + 2 \, b}{3 \, a}\right )\right ) + \frac {6 \, {\left ({\left (3 \, B a^{6} - 2 \, {\left (3 \, A + 2 \, C\right )} a^{5} b + B a^{4} b^{2} + 2 \, A a^{3} b^{3}\right )} \cos \left (d x + c\right )^{2} + {\left (C a^{6} + 2 \, B a^{5} b - 5 \, {\left (A + C\right )} a^{4} b^{2} + 2 \, B a^{3} b^{3} + A a^{2} b^{4}\right )} \cos \left (d x + c\right )\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + b}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{\sqrt {\cos \left (d x + c\right )}}}{9 \, {\left ({\left (a^{9} - 2 \, a^{7} b^{2} + a^{5} b^{4}\right )} d \cos \left (d x + c\right )^{2} + 2 \, {\left (a^{8} b - 2 \, a^{6} b^{3} + a^{4} b^{5}\right )} d \cos \left (d x + c\right ) + {\left (a^{7} b^{2} - 2 \, a^{5} b^{4} + a^{3} b^{6}\right )} d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\sqrt {\frac {1}{\cos \left (c+d\,x\right )}}\,\left (A+\frac {B}{\cos \left (c+d\,x\right )}+\frac {C}{{\cos \left (c+d\,x\right )}^2}\right )}{{\left (a+\frac {b}{\cos \left (c+d\,x\right )}\right )}^{5/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________